<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <jsp:include page="./header.jsp"></jsp:include>
</head>

<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">数据统计</h1>
</header>
<div class="mui-content">
    <ul class="mui-table-view mui-grid-view mui-grid-9">
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/order/index">
                <span class="mui-icon-extra mui-icon-extra-cart">
                    <span class="mui-badge mui-badge-red">${orderCount}</span>
                </span>
                <div class="mui-media-body">订单总数</div>
            </a>
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/devInfo/index">
                <span class="mui-icon mui-icon-contact"><span
                        class="mui-badge mui-badge-red">${devInfoCount}</span></span>
                <div class="mui-media-body">总用户数</div>
            </a>
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/repair/index">
                <span class="mui-icon mui-icon-compose">
                    <span class="mui-badge mui-badge-red">${feedBackCount}</span>
                </span>
                <div class="mui-media-body">设备报修</div>
            </a>
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/feedBack/index">
                <span class="mui-icon-extra mui-icon-extra-regist">
                    <span class="mui-badge mui-badge-red">${feedBackCount}</span>
                </span>
                <div class="mui-media-body">反馈信息</div>
            </a>
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/book/index">
                <span class="mui-icon-extra mui-icon-extra-calendar"><span
                        class="mui-badge mui-badge-red">${bookInfoCount}</span></span>
                <div class="mui-media-body">预约信息</div>
            </a>
        </li>
        <c:if test="${level eq 1}">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="${pageContext.request.contextPath}/distributor/manager/index?level=2">
                <span class="mui-icon-extra mui-icon-extra-peoples"><span
                        class="mui-badge mui-badge-red">${distributor2Count}</span></span>
                    <div class="mui-media-body">二级代理</div>
                </a>
            </li>
        </c:if>
        <c:if test="${(level eq 1) or (level eq 2)}">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="${pageContext.request.contextPath}/distributor/manager/index?level=3">
                    <span class="mui-icon-extra mui-icon-extra-peoples">
                        <span class="mui-badge mui-badge-red">${distributor3Count}</span>
                    </span>
                    <div class="mui-media-body">三级代理</div>
                </a>
            </li>
        </c:if>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
            <a href="${pageContext.request.contextPath}/distributor/info/accounts">
                <span class="mui-icon-extra mui-icon-extra-gold"></span>
                <div class="mui-media-body">分销金额</div>
            </a>
        </li>
    </ul>

</div>
<nav class="mui-bar mui-bar-tab">
    <a class="mui-tab-item mui-active" href="/distributor/total/index">
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">数据统计</span>
    </a>
    <a class="mui-tab-item" href="/distributor/center/index">
        <span class="mui-icon mui-icon-person"></span>
        <span class="mui-tab-label">我的信息</span>
    </a>
</nav>
</body>
<jsp:include page="./footer.jsp"></jsp:include>
<script src="${pageContext.request.contextPath}/static/mui/js/echarts-all.js"></script>
<script>
    mui.init({
        swipeBack: true //启用右滑关闭功能
    });
</script>
</html>